import request from '@/cfsheep/request';

const CfPayUtil = {

  // 根据条件拉取收入数据
  getDailyIncomeStatisticsListByQuery: (data) => {
    return request({
      url: '/payAdmin/cfAccount/getDailyIncomeStatisticsListByQuery',
      method: 'GET',
      data ,
      custom: {
        showSuccess: true,
        loadingMsg: '搜索中',
        successMsg: '搜索成功',
      },
    });
  },

  // 拉取支付机构
  getPaymentAgencyListByQuery: (data) => {
    return request({
      url: '/payAdmin/cfUserPaymentAgency/getPaymentAgencyListByQuery',
      method: 'GET',
      data ,
      custom: {
        showSuccess: true,
        loadingMsg: '搜索中',
        successMsg: '搜索成功',
      },
    });
  },

  // 拉取账单数据
  getOrderListByQuery: (data) => {
    return request({
      url: '/payAdmin/cfOrder/getListByQuery',
      method: 'GET',
      data ,
      custom: {
        showSuccess: true,
        loadingMsg: '搜索中',
        successMsg: '搜索成功',
      },
    });
  },

  // 订单退款
  refund: (data) => {
    return request({
      url: '/payAdmin/cfOrder/refund',
      method: 'POST',
      data ,
      custom: {
        showSuccess: true,
        loadingMsg: '操作中',
        successMsg: '操作成功',
      },
      header: {
        'Content-type': 'application/json;charset=UTF-8',
      }
    });
  },

};

export default CfPayUtil;
